import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible'
import { Button, NavBar, Form, Field, Tabbar, TabbarItem, Swipe, SwipeItem, Icon, Tab, Tabs, Panel, Card, Tag, Sticky, Cell, IndexBar, IndexAnchor, Picker, Overlay, DropdownMenu, DropdownItem, Popup } from 'vant'
import { carouselAPI } from '@/api/index.js'
import BaiduMap from 'vue-baidu-map'
Vue.config.productionTip = false

Vue.use(BaiduMap, {
  // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  ak: 'YOUR_APP_KEY'
})

Vue.use(Popup)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Overlay)

Vue.use(Picker)
Vue.use(IndexBar)
Vue.use(IndexAnchor)
Vue.use(Cell)
Vue.use(Sticky)
Vue.use(Tag)
Vue.use(Card)
Vue.use(Panel)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Icon)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Form)
Vue.use(Field)

Vue.use(NavBar)
const apiFN = async () => {
  try {
    const { data: res } = await carouselAPI()
    console.log(res)
  } catch (err) {
    console.dir(err)
  }
}
apiFN()
Vue.use(Button)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
